package com.blue.firecat.entity;

import com.blue.firecat.enums.OrderTypeEnum;
import com.blue.firecat.utils.date.DateUtil;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author
 */
public class Order implements Serializable {
    /**
     * 主键(订单号)
     */
    private Long id;

    /**
     * 角色名(打手看不到)
     */
    private String gameUserName;

    /**
     * 下单来源(打手看不到)
     */
    private String ww;

    /**
     * QQ号(打手看不到)
     */
    private String qq;

    /**
     * 手机号(打手看不到)
     */
    private Long phone;

    /**
     * 创建人id
     */
    private Long userId;
    /**
     * 创建人姓名
     */
    private String name;
    /**
     * 用户账号(打手申请未通过审核看不到)
     */
    private String gameUser;

    /**
     * 子帐号
     */
    private String gameUserChild;

    /**
     * 用户密码(打手申请未通过审核看不到)
     */
    private String gamePassword;

    /**
     * 游戏编号
     */
    private Integer gameId;

    /**
     * 游戏名称
     */
    private String gameName;

    /**
     * 区服
     */
    private String serviceArea;

    /**
     * 阵营
     */
    private String camp;

    /**
     * 职业天赋
     */
    private String professionalTalent;

    /**
     * 装等
     */
    private String install;

    /**
     * 标题
     */
    private String title;

    /**
     * 描述
     */
    private String content;

    /**
     * 订单价(打手看不到的金额,两位小数)
     */
    private BigDecimal orderPrice;

    /**
     * 结算价(展示给打手的金额)
     */
    private BigDecimal settlePrice;

    /**
     * 发布时间
     */
    private Date createTime;

    /**
     * 发布时间
     */
    private String createTimeString;
    /**
     * 总时间(当前-发布 单位:小时)
     */
    private Integer allTime;

    /**
     * 订单类型,0未知,1过期,2未接手(这个状态打手才能在列表中看到),3正在代练,4等待验收,5订单异常(打手操作),6已结算(仅管理员操作)
     */
    private Integer type;

    /**
     * 订单类型
     */
    private String typeString;
    /**
     * 备注
     */
    private String remark;

    /**
     * 操作人
     */
    private String operate;

    /**
     * 指定打手id
     */
    private Long beaterId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGameUserName() {
        return gameUserName;
    }

    public void setGameUserName(String gameUserName) {
        this.gameUserName = gameUserName;
    }

    public String getWw() {
        return ww;
    }

    public void setWw(String ww) {
        this.ww = ww;
    }

    public Long getBeaterId() {
        return beaterId;
    }

    public void setBeaterId(Long beaterId) {
        this.beaterId = beaterId;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public Long getPhone() {
        return phone;
    }

    public void setPhone(Long phone) {
        this.phone = phone;
    }

    public String getGameUser() {
        return gameUser;
    }

    public void setGameUser(String gameUser) {
        this.gameUser = gameUser;
    }

    public String getGameUserChild() {
        return gameUserChild;
    }

    public void setGameUserChild(String gameUserChild) {
        this.gameUserChild = gameUserChild.trim();
    }

    public String getGamePassword() {
        return gamePassword;
    }

    public void setGamePassword(String gamePassword) {
        this.gamePassword = gamePassword;
    }

    public Integer getGameId() {
        return gameId;
    }

    public void setGameId(Integer gameId) {
        if (gameId == -1) {
            return;
        }
        this.gameId = gameId;
    }

    public String getGameName() {
        return gameName;
    }

    public void setGameName(String gameName) {
        this.gameName = gameName;
    }

    public String getServiceArea() {
        return serviceArea;
    }

    public void setServiceArea(String serviceArea) {
        this.serviceArea = serviceArea;
    }

    public String getCamp() {
        return camp;
    }

    public void setCamp(String camp) {
        this.camp = camp.trim();
    }

    public String getProfessionalTalent() {
        return professionalTalent;
    }

    public void setProfessionalTalent(String professionalTalent) {
        this.professionalTalent = professionalTalent.trim();
    }

    public String getInstall() {
        return install;
    }

    public void setInstall(String install) {
        this.install = install.trim();;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title.trim();;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content.trim();;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public BigDecimal getSettlePrice() {
        return settlePrice;
    }

    public void setSettlePrice(BigDecimal settlePrice) {
        this.settlePrice = settlePrice;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
        this.setCreateTimeString(DateUtil.getInstance().getDateString(createTime));
    }

    public Integer getAllTime() {
        return allTime;
    }

    public void setAllTime(Integer allTime) {
        this.allTime = allTime;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
        this.setTypeString(OrderTypeEnum.getValueByCode(type));
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getOperate() {
        return operate;
    }

    public void setOperate(String operate) {
        this.operate = operate;
    }

    public String getCreateTimeString() {
        return createTimeString;
    }

    public void setCreateTimeString(String createTimeString) {
        this.createTimeString = createTimeString;
    }

    public String getTypeString() {
        return typeString;
    }

    public void setTypeString(String typeString) {
        this.typeString = typeString;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}